package com.stone;

import com.stone.util.NetworkUtil;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;

@EnableZuulProxy
@EnableEurekaClient
@EnableDiscoveryClient
@SpringBootApplication
public class ZuulServiceDemoApplication {

    public static void main(String[] args) {
        int port = NetworkUtil.getPort();
        new SpringApplicationBuilder(ZuulServiceDemoApplication.class).properties("server.port=" + port).run(args);
    }

}
